use serde::Serialize;
use tauri::{Manager, Window};

#[derive(Serialize, Clone)]
struct Payload {
  data: String,
}

#[tauri::command]
pub fn trigger_event(window: Window, playload: &str) {
    window
        .emit_all(
            "trigger_event",
            Payload {
                data: playload.into(),
            },
        )
        .unwrap();
}
